package pages;


import java.util.List;

import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;

import io.appium.java_client.android.AndroidDriver;

import io.appium.java_client.AppiumBy;


import utils.BaseAction;
public class HomePage {

	AndroidDriver  driver;
	BaseAction action;

	public HomePage(AndroidDriver  driver) {
		this.driver = driver;
		action= new BaseAction(driver);
	}	
	public WebElement yundong1() {
		WebElement yundong1 = (WebElement) driver.findElement(AppiumBy
				.id("njust.dzh.fitnesssystem:id/sport_event"));
		return yundong1;	
	}
	public WebElement button() {
		WebElement button = (WebElement) driver.findElement(AppiumBy
				.className("android.widget.ImageButton"));
		return button;
		
	}
	public WebElement yinshi1() {
		WebElement yinshi1 = (WebElement) driver.findElement(AppiumBy
				.id("njust.dzh.fitnesssystem:id/foodie_event"));
		return yinshi1;	
	}
	
	public YinshiPage yinshi() throws InterruptedException {
			
		action.click(yinshi1());
		return new YinshiPage(driver);
			
	}
	
	
	

	public YundongPage yundong() throws InterruptedException {
		
		action.click(yundong1());
		//action.click(button());
		return new YundongPage(driver);
		
	}
	
		

}
